package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type AddressInfoRouter struct {
}

// InitAddressInfoRouter 初始化 AddressInfo 路由信息
func (s *AddressInfoRouter) InitAddressInfoRouter(Router *gin.RouterGroup) {
	addressInfoRouter := Router.Group("addressInfo").Use(middleware.OperationRecord())
	addressInfoRouterWithoutRecord := Router.Group("addressInfo")
	var addressInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.AddressInfoApi
	{
		addressInfoRouter.POST("createAddressInfo", addressInfoApi.CreateAddressInfo)             // 新建AddressInfo
		addressInfoRouter.DELETE("deleteAddressInfo", addressInfoApi.DeleteAddressInfo)           // 删除AddressInfo
		addressInfoRouter.DELETE("deleteAddressInfoByIds", addressInfoApi.DeleteAddressInfoByIds) // 批量删除AddressInfo
		addressInfoRouter.PUT("updateAddressInfo", addressInfoApi.UpdateAddressInfo)              // 更新AddressInfo
	}
	{
		addressInfoRouterWithoutRecord.GET("findAddressInfo", addressInfoApi.FindAddressInfo)                 // 根据ID获取AddressInfo
		addressInfoRouterWithoutRecord.GET("getAddressInfoList", addressInfoApi.GetAddressInfoList)           // 获取AddressInfo列表
		addressInfoRouterWithoutRecord.GET("getAddressInfoListAll", addressInfoApi.GetAddressInfoInfoListAll) // 导出AddressInfo列表
	}
}
